package com.yycwxt.domain;

import com.alibaba.excel.annotation.ExcelProperty;
import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import lombok.Data;
import org.apache.poi.hpsf.Decimal;
import org.hibernate.validator.constraints.Length;

import javax.validation.constraints.NotBlank;
import javax.validation.constraints.NotNull;
import java.time.LocalDateTime;

@Data
@TableName("dct_flowfee")
public class Flowfee {

    @TableId(type = IdType.AUTO)
    private Integer id;

    @NotBlank(message = "name不能为空")
    @NotNull(message = "name不能为空")
    @ExcelProperty("快递公司名称")
    private String name;

//    @NotBlank(message = "不能为空")
//    @NotNull(message = "不能为空")
//    @ExcelProperty("联系人")
//    private String contact;

//    @NotBlank(message = "不能为空")
//    @NotNull(message = "不能为空")
//    @Length(min = 7, max = 11, message = "电话号码长度在7-11")
//    @ExcelProperty("电话")
//    private String tel;

    @NotBlank(message = "addrfrom不能为空")
    @NotNull(message = "addrfrom不能为空")
    @ExcelProperty("出发地")
    private String addrfrom;

    @NotBlank(message = "addrto不能为空")
    @NotNull(message = "addrto不能为空")
    @ExcelProperty("到达地")
    private String addrto;

//    @NotBlank(message = "不能为空")
//    @NotNull(message = "不能为空")
//    @ExcelProperty("最低公斤数")
//    private int min;

    @NotNull(message = "max不能为空")
    @ExcelProperty("最高公斤数")
    private int max;

    @NotNull(message = "fee不能为空")
    @ExcelProperty("费用")
    private int fee;

    @ExcelProperty("备注")
    private String remark;

    @ExcelProperty("创建时间")
    private LocalDateTime created;

}
